A constraint is a delegate node called by other operational nodes.
It does not do anything on its own per se but is always triggered by another node.
bool IsInverted (void)
Returns
true if the user has set the "inverted" option in the interface
bool IsParticleConstraint (void)
Returns
true if this is a particle constraint. Otherwise it is a pure grid constraint.
bool GetConstraint (const vector3d& position, double& src_value, void* local_data, int cpu = 0)
Returns
true if the constraint value could be retrieved and if that value is != 0.0. false if there was an error or if the sampled value is 0.0.
Parameters
const vector3d& position:
The physical positon to sample
double& src_value:
Filled with the constraint value. This could be the result of several constraints so may not strictly be the explicit constraint value.
void* local_data:
Currently unused
int cpu:
The current cpu thread. Pass if you are working in a multithreaded context.
bool GetConstraintParticle (const vector3d& position, double& src_value, void* local_data, int cpu = 0, const void* t_particle = NULL)
Returns
true if the constraint value could be retrieved and if that value is != 0.0. false if there was an error or if the sampled value is 0.0.
Parameters
const vector3d& position:
The physical positon to sample
double& src_value:
Filled with the constraint value. This could be the result of several constraints so may not strictly be the explicit constraint value.
void* local_data:
Currently unused
int cpu:
The current cpu thread. Pass if you are working in a multithreaded context.
const void* t_particle:
Pass the FXParticle this constraint should take into account. Only used for particle constraints (mandatory)!